
<?php do_action( 'before' ); ?>
<?php if ( (in_array( 'woocommerce/woocommerce.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ) || (in_array( 'jigoshop/jigoshop.php', apply_filters( 'active_plugins', get_option( 'active_plugins' ) ) ))) ) { ?>
<?php global $woocommerce; ?>
<div class="top-login col-md-offset-3 pull-right">
		<?php if ( ! is_user_logged_in() ) {  ?>
		<ul class="list-inline">
			<li>
				<div class="div-login">
					<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><i class="icon-user"></i>My Account</a>
				</div> 
			</li>
			<li>
				<div class="div-checkout">
					<a href="<?php echo $woocommerce->cart->get_cart_url(); ?>"><i class="icon-money "></i>Checkout</a>
				</div>
			</li>
			<li>
				<div class="div-register">
					<div class="login-top">
						<a href="javascript:void(0);"><span><i class="icon-lock"></i> <?php _e('Register', 'yatheme'); ?> </span></a>
					</div>
					<div class="register-content">
						<?php get_template_part('woocommerce/myaccount/register-form'); ?>
					</div>
				</div>
			</li>
			<li>
				<div class="div-login">
					<div class="login-top">
						<a href="javascript:void(0);"><span><i class="icon-lock"></i> <?php _e('Login', 'yatheme'); ?> </span></a>
					</div>
					<div class="login-content">
						<?php get_template_part('woocommerce/myaccount/login-form'); ?>
					</div>
				</div>
			</li>
		</ul>	
		<?php } else{?>
		<ul class="list-inline">
			<li>
				<div class="div-login">
							<?php 
							$user_id = get_current_user_id();
							$user_info = get_userdata( $user_id );	
						?>
						<?php _e('Welcome ', 'yatheme'); ?> <?php echo $user_info-> user_nicename;  ?>-<a href="<?php echo wp_logout_url( home_url() ); ?>" title="Logout"><?php _e('Logout', 'yatheme'); ?></a>
				</div>
			</li>
			<li>
				<div class=" div-login">
					<a href="<?php echo get_permalink( get_option('woocommerce_myaccount_page_id') ); ?>" title="<?php _e('My Account','woothemes'); ?>"><i class="icon-user"></i>My Account</a>
				</div>
			</li>
			<li>
				<div class=" div-login">
							<a href="<?php echo $woocommerce->cart->get_cart_url(); ?>"><i class="icon-money "></i>Checkout</a>
				</div>
			</li>
		</ul>
		<?php } ?>
	
</div>
<?php } ?>
